﻿using System;
using System.IO;
using System.Xml;

namespace DotNetNuke.Modules.UserDefinedTable
{


  [Serializable]
  public class TemplateInfo
  {
    private XmlNode _AdditionalData;
    private string _Description;
    private string _Export;
    private string _Name;

    public string GetXml()
    {
      using (StringWriter writer = new StringWriter())
      {
        using (XmlTextWriter writer2 = new XmlTextWriter(writer))
        {
          writer2.Formatting = Formatting.Indented;
          writer2.WriteStartElement("moduletemplate");
          writer2.WriteAttributeString("title", this.Name);
          writer2.WriteAttributeString("description", this.Description);
          writer2.WriteAttributeString("xmlns", "ask", null, "DotNetNuke/ModuleTemplate");
          writer2.WriteRaw(this.ExportContent);
          writer2.WriteEndElement();
          writer2.Close();
        }
        return writer.ToString();
      }
    }

    public XmlNode AdditionalData
    {
      get
      {
        return this._AdditionalData;
      }
      set
      {
        this._AdditionalData = value;
      }
    }

    public string Description
    {
      get
      {
        return this._Description;
      }
      set
      {
        this._Description = value;
      }
    }

    public string ExportContent
    {
      get
      {
        return this._Export;
      }
      set
      {
        this._Export = value;
      }
    }

    public string Name
    {
      get
      {
        return this._Name;
      }
      set
      {
        this._Name = value;
      }
    }


  }

}

